import { axios } from '@/utils/request'

/**
 * 查询钉钉流程列表
 * @param query
 * @returns {*}
 */
export function pageDdFlow(query) {
  return axios({
    url: '/workflow/ddFlow/page',
    method: 'get',
    params: query
  })
}

/**
 * 查询钉钉流程详细
 * @param id
 * @returns {*}
 */
export function getDdFlow(id) {
  return axios({
    url: '/workflow/ddFlow/' + id,
    method: 'get'
  })
}

/**
 * 新增钉钉流程
 * @param data
 * @returns {*}
 */
export function addDdFlow(data) {
  return axios({
    url: '/workflow/ddFlow',
    method: 'post',
    data: data
  })
}

/**
 * 修改钉钉流程
 * @param data
 * @returns {*}
 */
export function updateDdFlow(data) {
  return axios({
    url: '/workflow/ddFlow',
    method: 'put',
    data: data
  })
}

/**
 * 删除钉钉流程
 * @param id
 * @returns {*}
 */
export function delDdFlow(id) {
  return axios({
    url: '/workflow/ddFlow/' + id,
    method: 'delete'
  })
}
